//
//  AnimationManager.m
//  ReactiveTest
//
//  Created by Huadong Zheng on 2023/6/16.
//

#import "AnimationDelegateManager.h"

@interface AnimationDelegateManager()

@end

@implementation AnimationDelegateManager

-(void)setAnimation:(CAAnimation *)animation{
    _animation = animation;
    _animation.delegate = self;
    self.successBlock = nil;
}
-(void) configCompleteBlock:(void(^)(void)) successBlock{
    
    self.successBlock = successBlock;
}

-(void)animationDidStart:(CAAnimation *)anim{
    self.isInAnimation = true;
}
-(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{
    self.isInAnimation = false;
    self.successBlock();
    
}



@end
